package en.edu.zxj.springrabbimqdemo.config;

import en.edu.zxj.springrabbimqdemo.constant.Constants;
import org.springframework.amqp.core.Queue;
import org.springframework.amqp.core.QueueBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Created with IntelliJ IDEA.
 * Description：声明队列
 *
 * @author: zxj
 * @date: 2024-09-20
 * @time: 13:51:34
 */
@Configuration
public class RabbitMQConfig {

    // 1. 工作模式队列
    @Bean("workQueue")
    public Queue workQueue() {
        return QueueBuilder.durable(Constants.WORK_QUEUE_NAME).build();
    }
}
